package com.github.caijh.mall.store.service;

import java.util.Collection;
import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.caijh.mall.store.model.StoreProduct;
import com.github.caijh.mall.store.model.StoreProductCoupon;

public interface StoreProductCouponService extends IService<StoreProductCoupon> {

    /**
     * 根据产品id删除 优惠券关联信息
     *
     * @param productId 产品id
     */
    void deleteByProductId(Integer productId);

    void updateProductCoupons(StoreProduct storeProduct, Collection<Integer> couponIds);

    /**
     * 根据商品id获取已关联优惠券信息
     *
     * @param productId 商品id
     * @return 已关联优惠券
     */
    List<StoreProductCoupon> listByProductId(Integer productId);

}
